﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace Skyttespill
{
    public abstract class MovingObject
    {

        protected Brush color;
        private Boolean active = true;

        protected int diameter;
        protected float x = 10F, y = -40F;
        protected float v = 3.0F;
        public int CurrentPosX, CurrentPosY, StarPosX, StarPosY;


        // For å sjekke om et objekt skal fjernes.
        public Boolean Active
        {
            get { return active; }
            set { active = value; }
        }

        // Lengden
        public int Diameter
        {
            get { return diameter; }
            set { diameter = value; }
        }

        // X
        public float X
        {
            get { return x; }
            set { x = value; }
        }

        // Y
        public float Y
        {
            get { return y; }
            set { y = value; }
        }

        // Rec
        public RectangleF Rectangle()
        {
            return new RectangleF(x, y, diameter, diameter);
        }

        // Kollisjon
        public virtual void Krash()
        {
            Active = false;
        }

        public abstract void Move();
        public abstract void tegn(Graphics e);
    }
}
